{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Warning : `load_model` does not return WordVectorModel or SupervisedModel any more, but a `FastText` object which is very similar.\n",
      "Warning : `load_model` does not return WordVectorModel or SupervisedModel any more, but a `FastText` object which is very similar.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Political</th>\n",
       "      <th>Hate</th>\n",
       "      <th>Political hate</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>(1.0, political)</td>\n",
       "      <td>(1.0, hate)</td>\n",
       "      <td>(0.83, political)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>(0.68, correctness)</td>\n",
       "      <td>(0.78, hatred)</td>\n",
       "      <td>(0.79, hate)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>(0.68, opponent)</td>\n",
       "      <td>(0.73, hateful)</td>\n",
       "      <td>(0.71, correctness)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>(0.68, politic)</td>\n",
       "      <td>(0.66, incite)</td>\n",
       "      <td>(0.7, hatred)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>(0.66, rival)</td>\n",
       "      <td>(0.66, haters)</td>\n",
       "      <td>(0.69, espouse)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>(0.64, partisan)</td>\n",
       "      <td>(0.66, bigotry)</td>\n",
       "      <td>(0.69, politic)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>(0.63, apolitical)</td>\n",
       "      <td>(0.64, intolerance)</td>\n",
       "      <td>(0.69, divisiveness)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>(0.63, ideological)</td>\n",
       "      <td>(0.63, supremacists)</td>\n",
       "      <td>(0.66, hateful)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>(0.62, politically)</td>\n",
       "      <td>(0.63, hater)</td>\n",
       "      <td>(0.65, incite)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>(0.6, influence)</td>\n",
       "      <td>(0.62, supremacist)</td>\n",
       "      <td>(0.65, ideology)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>(0.59, weaponize)</td>\n",
       "      <td>(0.62, homophobia)</td>\n",
       "      <td>(0.65, divisive)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>(0.58, cynical)</td>\n",
       "      <td>(0.62, racists)</td>\n",
       "      <td>(0.63, weaponize)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>(0.58, solely)</td>\n",
       "      <td>(0.62, foment)</td>\n",
       "      <td>(0.63, discourse)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>(0.58, partisanship)</td>\n",
       "      <td>(0.61, stoke)</td>\n",
       "      <td>(0.63, ideological)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>(0.57, weaponizing)</td>\n",
       "      <td>(0.61, racist)</td>\n",
       "      <td>(0.63, animosity)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>(0.56, weaponized)</td>\n",
       "      <td>(0.61, incitement)</td>\n",
       "      <td>(0.62, overt)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>(0.56, cartoons)</td>\n",
       "      <td>(0.61, espouse)</td>\n",
       "      <td>(0.62, intolerance)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>(0.56, legitimate)</td>\n",
       "      <td>(0.61, spew)</td>\n",
       "      <td>(0.62, rhetoric)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>(0.56, deference)</td>\n",
       "      <td>(0.6, racism)</td>\n",
       "      <td>(0.62, promote)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>(0.55, discourse)</td>\n",
       "      <td>(0.6, supremacy)</td>\n",
       "      <td>(0.61, foment)</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               Political                  Hate        Political hate\n",
       "0       (1.0, political)           (1.0, hate)     (0.83, political)\n",
       "1    (0.68, correctness)        (0.78, hatred)          (0.79, hate)\n",
       "2       (0.68, opponent)       (0.73, hateful)   (0.71, correctness)\n",
       "3        (0.68, politic)        (0.66, incite)         (0.7, hatred)\n",
       "4          (0.66, rival)        (0.66, haters)       (0.69, espouse)\n",
       "5       (0.64, partisan)       (0.66, bigotry)       (0.69, politic)\n",
       "6     (0.63, apolitical)   (0.64, intolerance)  (0.69, divisiveness)\n",
       "7    (0.63, ideological)  (0.63, supremacists)       (0.66, hateful)\n",
       "8    (0.62, politically)         (0.63, hater)        (0.65, incite)\n",
       "9       (0.6, influence)   (0.62, supremacist)      (0.65, ideology)\n",
       "10     (0.59, weaponize)    (0.62, homophobia)      (0.65, divisive)\n",
       "11       (0.58, cynical)       (0.62, racists)     (0.63, weaponize)\n",
       "12        (0.58, solely)        (0.62, foment)     (0.63, discourse)\n",
       "13  (0.58, partisanship)         (0.61, stoke)   (0.63, ideological)\n",
       "14   (0.57, weaponizing)        (0.61, racist)     (0.63, animosity)\n",
       "15    (0.56, weaponized)    (0.61, incitement)         (0.62, overt)\n",
       "16      (0.56, cartoons)       (0.61, espouse)   (0.62, intolerance)\n",
       "17    (0.56, legitimate)          (0.61, spew)      (0.62, rhetoric)\n",
       "18     (0.56, deference)         (0.6, racism)       (0.62, promote)\n",
       "19     (0.55, discourse)      (0.6, supremacy)        (0.61, foment)"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#########################\n",
    "### Import libraries ####\n",
    "#########################\n",
    "\n",
    "\n",
    "from scripts_for_table_3 import *\n",
    "\n",
    "#####################################\n",
    "### Create face validity scores ####\n",
    "#####################################\n",
    "\n",
    "\n",
    "words_to_use = [\"political\",\"hate\",[\"political\",\"hate\"]]\n",
    "facebook_facevalidity = face_validity_scores(words_to_use,\"facebook\")\n",
    "facebook_facevalidity[0:20].to_latex(\"facevalidity_facebook.tex\",index = False)\n",
    "facebook_facevalidity[0:20]"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "dask2",
   "language": "python",
   "name": "dask2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
